﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

using System.Data.Entity;
using PeliGo.DataModel;

namespace PeliGo.BL
{
    public class VentaBL
    {
        private PeliGoEntities1 datacontext;

        public VentaBL()
        {
            datacontext = new PeliGoEntities1();
        }

        public void AgregarVenta(Venta objVenta)
        {
            datacontext.Venta.Add(objVenta);
            datacontext.SaveChanges();            
        }

        public void AgregarDetalle(Detalle_Venta objDetalle)
        {
            datacontext.Detalle_Venta.Add(objDetalle);
            datacontext.SaveChanges();
        }
    }
}
